import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import {Provider} from 'react-redux'
import {createStore,combineReducers} from 'redux'
import {BrowserRouter} from 'react-router-dom';
import {todos} from "./reducer/todo"

let initTodo = {
	todos: [
		{
			title: "react",
			content: "学习react"
		},
		{
			title: "js",
			content: "学习js"
		},
	]
}
let reducer = combineReducers({
	todos
})
let store = createStore( reducer,initTodo )

ReactDOM.render(
	<Provider store={store} >
		<BrowserRouter>
			<App />
		</BrowserRouter>
	</Provider>, 
	document.getElementById('root')
);
registerServiceWorker();
